package com.hongxun.design.utils;

import android.os.Handler;
import android.text.InputType;
import android.view.View;
import android.view.View.OnClickListener;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.hongxun.design.MyApp;
import com.hongxun.design.R;
import com.hongxun.design.activitys.StatisticalAnalysisActivity;
import com.hongxun.design.bean.BackPhoto_Bean;
import com.hongxun.design.bean.BackPhotosBean;
import com.hongxun.design.bean.BitTypeTabItemBean;
import com.hongxun.design.bean.ChannelAListBean;
import com.hongxun.design.bean.ChannelListBean;
import com.hongxun.design.bean.CodelibraryConditionBean;
import com.hongxun.design.bean.CreateDistanceBean;
import com.hongxun.design.bean.CreateProjectBean;
import com.hongxun.design.bean.Exploration;
import com.hongxun.design.bean.HeadSecondBean;
import com.hongxun.design.bean.HomeListFunctionBean;
import com.hongxun.design.bean.MyListViewItemBean;
import com.hongxun.design.bean.PhotoBean;
import com.hongxun.design.bean.PhotoEnvironmentalItemBean;
import com.hongxun.design.bean.PhotoGraphBean;
import com.hongxun.design.bean.PhotoPassIconTermBean;
import com.hongxun.design.bean.PhotoPassagewayBean;
import com.hongxun.design.bean.PhotoPassagewayItemBean;
import com.hongxun.design.bean.PopWindowItemBean;
import com.hongxun.design.bean.ProjectSumBean;
import com.hongxun.design.bean.ProjectSumItemBean;
import com.hongxun.design.bean.ReconnaissanceBean;
import com.hongxun.design.bean.SearchBean;
import com.hongxun.design.bean.SetPointInfItemBean;
import com.hongxun.design.bean.SettingItemBean;
import com.hongxun.design.bean.photopassbean.SystemTypeBean;
import com.hongxun.design.constant.Constant;
import com.hongxun.design.fragments.ProjectFragment;
import com.hongxun.design.listeners.ListenerSet;
import com.hongxun.design.mytools.IconSourse;
import com.hongxun.design.mytools.MString;
import com.hongxun.design.mytools.MyLog;
import com.hongxun.design.mytools.ShardPreferencesTool;
import com.hongxun.design.utils.clearcache.DataCleanManager;
import com.hongxun.design.utils.fastjson.FastJsonUtil;
import com.hongxun.design.utils.httputil.HttpStringCodeTableUtil;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by zerdoor_pc on 2016/4/28.
 * 数据打包类
 */
public class DataUtil {
    /**
     * 首页gridview功能数据包*
     */
    public static List<HomeListFunctionBean> getFunctions() {
        List<HomeListFunctionBean> list = new ArrayList<>();
        list.add(getFunction(R.drawable.circular_redl_all, IconSourse.TASHE, "点位采集", ListenerSet.founction_SetFoot));
        list.add(getFunction(R.drawable.circular_greenl_all, IconSourse.ZIJIAN, "组装材料", ListenerSet.founction_proiteminfo));
        list.add(getFunction(R.drawable.circular_yellowl_all, IconSourse.DIANSHE, "随手拍", ListenerSet.founction_codelibrary));
//        list.add(getFunction(R.drawable.circular_bluel_all, IconSourse.DAOHANG, "项目导航", ListenerSet.founction_navigation));
        list.add(getFunction(R.drawable.circular_yellowl_all, IconSourse.TONGJI, "数据检查", ListenerSet.founction_selfcheck));
//        list.add(getFunction(R.drawable.circular_bluel_all, IconSourse.RIZHI, "工作日志", ListenerSet.founction_logfill));
        list.add(getFunction(R.drawable.circular_greenl_all, IconSourse.TONGBU, "数据上传", ListenerSet.founction_synchronization));
        list.add(getFunction(R.drawable.circular_redl_all, IconSourse.CHUANGJIAN, "创建项目", ListenerSet.founction_createprojects));
        return list;
    }

    /**
     * 单个功能属性*
     */
    public static HomeListFunctionBean getFunction(int resource, CharSequence icon, String name, OnClickListener listener) {
        HomeListFunctionBean functionBean = new HomeListFunctionBean();
        functionBean.setFunctionBgColor(resource);
        functionBean.setFunctionIcon(icon);
        functionBean.setFunctionName(name);
        functionBean.setListener(listener);
        return functionBean;
    }

    /**
     * 首页popwindow数据*
     */
    public static List<PopWindowItemBean> getPopItem() {
        List<PopWindowItemBean> list = new ArrayList<>();
        list.add(new PopWindowItemBean("创建项目", IconSourse.SHITICHUANGJIAN, ListenerSet.founction_createprojects));
//        list.add(new PopWindowItemBean("面对面快传", IconSourse.KUAICHUAN, ListenerSet.founction_facetoface));
        list.add(new PopWindowItemBean("扫一扫", IconSourse.ERWEIMA, ListenerSet.founction_scantoscan));
        return list;
    }

    /**
     * 点位设置*
     */
    public static List<PopWindowItemBean> getPointInfPopItem() {
        List<PopWindowItemBean> list = new ArrayList<>();
        list.add(new PopWindowItemBean("记录交叉跨越", IconSourse.RECORDCROSSING, ListenerSet.getPhotoGrapImageClickListener(Constant.TypePassageway)));
        list.add(new PopWindowItemBean("删除定位点", IconSourse.DELECT, ListenerSet.getDelectClicklinstener()));
        return list;
    }

    /**
     * 材料设置
     */
    public static List<PopWindowItemBean> getMaterialItem(Map<String, Object> map) {
        List<PopWindowItemBean> list = new ArrayList<>();

        list.add(new PopWindowItemBean(MString.Modular, MString.Yellow,
                ListenerSet.getAddMaterialItemClickListener(MString.Modular, map)));

        list.add(new PopWindowItemBean(MString.MaterialScience, MString.Green,
                ListenerSet.getAddMaterialItemClickListener(MString.MaterialScience, map)));

        return list;
    }

    /**
     * 材料设置
     */
    public static List<PopWindowItemBean> getMaterialItem1(int case1, int case2, Handler handler) {
        List<PopWindowItemBean> list = new ArrayList<>();

        list.add(new PopWindowItemBean(MString.Modular, MString.Yellow,
                ListenerSet.getMaterial_ModularItemClickListener(case1, handler)));

        list.add(new PopWindowItemBean(MString.MaterialScience, MString.Green,
                ListenerSet.getMaterial_ModularItemClickListener(case2, handler)));

        return list;
    }


    /**
     * 二级菜单信息包*
     */

    public static HeadSecondBean getsecondbean(String right_icon, int right_ishide, int right_color,
                                               View.OnClickListener listener, String title, int title_color,
                                               int ishide, String left_icon, int left_ishide) {
        HeadSecondBean bean = new HeadSecondBean();
        bean.setRight_icon(right_icon);
        bean.setRight_ishide(right_ishide);
        bean.setRight_color(right_color);
        bean.setListener(listener);
        bean.setTitle(title);
        bean.setIshide(ishide);
        bean.setTitle_color(title_color);
        bean.setLeft_icon(left_icon);
        bean.setLeft_ishide(left_ishide);
        return bean;
    }

    /**
     * 创建项目栏目数据*
     */
    public static List<CreateProjectBean> getCreateItemData() {
        List<CreateProjectBean> list = new ArrayList<>();
        // name,typeName,typeNum,value,valueColor,valueUncheck,valueUncheckColor,rightIcon,rightColor,itemType Constant.
//        项目名称、设计阶段、项目地址、当地联系人姓名（非必填）、当地联系人电话（非必填）、适用典设、项目负责人 + 项目踏勘人
//       （默认为当前创建人，可增加/修改人员，但创建人必须是负责人或踏勘人之一），语音备注（非必填）、文字备注（非必填），经度，纬度，海拔，其他去掉

        list.add(new CreateProjectBean(MString.project_name, "项目名称", Constant.基本信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.project_type, "项目类型", Constant.基本信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectType), Constant.ACTIVITYNO, MString.ismust));//新建改造
        list.add(new CreateProjectBean(MString.stage, "设计阶段", Constant.基本信息, 3, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.designStage), Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.address, "项目地址", Constant.基本信息, 5, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMAP, MString.ismust));
        list.add(new CreateProjectBean(MString.weather_zone, "气象分区", Constant.设计信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.weatherZone), Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.power_zone, "供电分区", Constant.设计信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.powerZone), Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.codeset_version_id, "适用典设", Constant.设计信息, 2, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYCODESET, MString.ismust));


        list.add(new CreateProjectBean(MString.manager, Constant.项目负责人, Constant.相关信息, 0, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));
        list.add(new CreateProjectBean(MString.explorationer, Constant.项目踏勘人, Constant.相关信息, 1, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));

        list.add(new CreateProjectBean(MString.linkman, "当地联系人姓名", Constant.主要联系人, 0, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        list.add(new CreateProjectBean(MString.linkphone, "当地联系人电话", Constant.主要联系人, 1, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));

        list.add(new CreateProjectBean(MString.characters_remark, "", Constant.备注, 0, "", Constant.CREATE_REMARKS, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        list.add(new CreateProjectBean(MString.voice_remark, "语音备注", Constant.备注, 1, "", Constant.CREATE_SPEECH, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));


        // list.add(new CreateProjectBean(MString.project_attribute, "项目属性", Constant.基本信息, 2, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectAttribute), Constant.ACTIVITYMULTISELECT, MString.ismust));
        // list.add(new CreateProjectBean(MString.region, "项目区域", Constant.基本信息, 4, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectRegion), Constant.ACTIVITYNO, MString.ismust));
        //list.add(new CreateProjectBean(MString.detail_address, "详细地址", Constant.基本信息, 6, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        //选填
        //list.add(new CreateProjectBean("", "项目创建人", Constant.基本信息, 7, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        // list.add(new CreateProjectBean("", "创建时间", Constant.基本信息, 8, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));

        // list.add(new CreateProjectBean(MString.soil, "土质信息", Constant.设计信息, 3, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYSOIL, MString.nomust));
        //list.add(new CreateProjectBean(MString.transport, "二次转运距离", Constant.设计信息, 4, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYDISTANCE, MString.nomust));
        //list.add(new CreateProjectBean(MString.wire_type, "导线类型", Constant.设计信息, 5, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.wireType), Constant.ACTIVITYNO, MString.ismust));

        // list.add(new CreateProjectBean(MString.design_unit, Constant.设计单位, Constant.相关信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYRADIO, MString.ismust));
        // list.add(new CreateProjectBean(MString.owner_unit, Constant.业主单位, Constant.相关信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYRADIO, MString.ismust));
        //list.add(new CreateProjectBean(MString.auditor, Constant.项目审核人, Constant.相关信息, 2, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));
        // list.add(new CreateProjectBean(MString.designer, Constant.项目设计人, Constant.相关信息, 4, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));

        return list;
    }


    /**
     * (new)创建项目栏目数据-竣工助手
     */
    public static List<CreateProjectBean> getJGCreateItemData() {
        List<CreateProjectBean> list = new ArrayList<>();
        list.add(new CreateProjectBean(MString.project_name, "项目名称", Constant.基本信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.project_type, "项目类型", Constant.基本信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectType), Constant.ACTIVITYNO, MString.ismust));//新建改造
        list.add(new CreateProjectBean(MString.address, "项目地址", Constant.基本信息, 5, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMAP, MString.ismust));

        list.add(new CreateProjectBean(MString.manager, Constant.项目负责人, Constant.项目团队人员, 1, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));
        list.add(new CreateProjectBean(MString.explorationer, Constant.项目参与人, Constant.项目团队人员, 1, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));

        list.add(new CreateProjectBean(MString.characters_remark, "", Constant.备注, 0, "", Constant.CREATE_REMARKS, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));

        return list;
//        list.add(new CreateProjectBean(MString.manager, Constant.项目负责人, Constant.项目团队人员, 1, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.ismust));
    }

    /**
     * (new)创建项目典设-竣工助手
     */
    public static List<SetPointInfItemBean> getJGCreateDialogData() {
        List<SetPointInfItemBean> data = new ArrayList<>();
        data.add(new SetPointInfItemBean("典设名称", MString.name, 0, "填写", "", true, null));
        data.add(new SetPointInfItemBean("典设编号", MString.code_one, 0, "填写", "", true, null));
        data.add(new SetPointInfItemBean("典设类型", MString.pt_id, 1, "未选择", "", true, null));
        data.add(new SetPointInfItemBean("适用范围", MString.voltage_grade, 2, "未选择", "", true, DataUtil.getSystemTypeBean(HttpStringCodeTableUtil.voltageGrade)));
        return data;
    }


    public static ArrayList<String> getPhotoItemData() {
        ArrayList<String> beanList = new ArrayList<>();
        String[] typename = {"砍青赔偿", "土质异常", "隐蔽工程", "设备合格证", "试验报告"};
        for (int i = 0; i < typename.length; i++) {
            beanList.add(typename[i]);
        }
        return beanList;
    }

    /**
     * 项目详情栏目数据*
     */
    public static List<CreateProjectBean> getProjectItemData() {
        List<CreateProjectBean> list = new ArrayList<>();
        // name,typeName,typeNum,value,valueColor,valueUncheck,valueUncheckColor,rightIcon,rightColor,itemType Constant.
//        项目名称、设计阶段、项目地址、当地联系人姓名（非必填）、当地联系人电话（非必填）、适用典设、项目负责人 + 项目踏勘人
//       （默认为当前创建人，可增加/修改人员，但创建人必须是负责人或踏勘人之一），语音备注（非必填）、文字备注（非必填），经度，纬度，海拔，其他去掉

        list.add(new CreateProjectBean(MString.project_name, "项目名称", Constant.基本信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.ismust));


        list.add(new CreateProjectBean(MString.project_type, "项目类型", Constant.基本信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectType), Constant.ACTIVITYNO, MString.ismust));//新建改造
        list.add(new CreateProjectBean(MString.project_attribute, "项目属性", Constant.基本信息, 2, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectAttribute), Constant.ACTIVITYMULTISELECT, MString.ismust));
        list.add(new CreateProjectBean(MString.stage, "设计阶段", Constant.基本信息, 3, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.designStage), Constant.ACTIVITYNO, MString.ismust));

        list.add(new CreateProjectBean(MString.region, "项目区域", Constant.基本信息, 4, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectRegion), Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.address, "项目地址", Constant.基本信息, 5, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMAP, MString.ismust));


        list.add(new CreateProjectBean(MString.detail_address, "详细地址", Constant.基本信息, 6, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        //选填
//        list.add(new CreateProjectBean("", "项目创建人", Constant.基本信息, 7, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
//        list.add(new CreateProjectBean("", "创建时间", Constant.基本信息, 8, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        list.add(new CreateProjectBean(MString.weather_zone, "气象分区", Constant.设计信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.weatherZone), Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.power_zone, "供电分区", Constant.设计信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.powerZone), Constant.ACTIVITYNO, MString.ismust));
        list.add(new CreateProjectBean(MString.codeset_version_id, "适用典设", Constant.设计信息, 2, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYCODESET, MString.ismust));

        list.add(new CreateProjectBean(MString.soil, "土质信息", Constant.设计信息, 3, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYSOIL, MString.nomust));
        list.add(new CreateProjectBean(MString.transport, "二次转运距离", Constant.设计信息, 4, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYDISTANCE, MString.nomust));
        list.add(new CreateProjectBean(MString.wire_type, "导线类型", Constant.设计信息, 5, "", Constant.CREATE_GENERAL, Constant.CLICKPOP, (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.wireType), Constant.ACTIVITYNO, MString.ismust));

        list.add(new CreateProjectBean(MString.design_unit, Constant.设计单位, Constant.相关信息, 0, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYRADIO, MString.ismust));
        list.add(new CreateProjectBean(MString.owner_unit, Constant.业主单位, Constant.相关信息, 1, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYRADIO, MString.ismust));


        list.add(new CreateProjectBean(MString.auditor, Constant.项目审核人, Constant.相关信息, 2, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));
        list.add(new CreateProjectBean(MString.designer, Constant.项目设计人, Constant.相关信息, 4, "", Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));

        list.add(new CreateProjectBean(MString.manager, Constant.项目负责人, Constant.相关信息, 3, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));
        list.add(new CreateProjectBean(MString.explorationer, Constant.项目踏勘人, Constant.相关信息, 5, MyApp.userInfo.getRealname(), Constant.CREATE_GENERAL, Constant.CLICKACTIVITY, null, Constant.ACTIVITYMULTISELECT, MString.ismust));

        list.add(new CreateProjectBean(MString.linkman, "当地联系人姓名", Constant.主要联系人, 0, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        list.add(new CreateProjectBean(MString.linkphone, "当地联系人电话", Constant.主要联系人, 1, "", Constant.CREATE_GENERAL, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));

        list.add(new CreateProjectBean(MString.characters_remark, "", Constant.备注, 0, "", Constant.CREATE_REMARKS, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));
        list.add(new CreateProjectBean(MString.voice_remark, "语音备注", Constant.备注, 1, "", Constant.CREATE_SPEECH, Constant.CLICKEDTEXT, null, Constant.ACTIVITYNO, MString.nomust));

        return list;
    }


    /**
     * 得到注册数据包*
     */
    public static List<CreateDistanceBean> getRegeditDate() {
        List<CreateDistanceBean> list = new ArrayList<>();
        list.add(new CreateDistanceBean("用户名", Constant.inputStyle, "", MString.username));
        list.add(new CreateDistanceBean("手机", Constant.inputStyle, "", MString.mobilePhone));
        list.add(new CreateDistanceBean("验证码", Constant.buttonStyle, "", MString.ident_code));
        list.add(new CreateDistanceBean("密码", Constant.inputStyle, "", MString.pwd));
        return list;
    }

    /**
     * 得到短信数据包*
     */
    public static List<CreateDistanceBean> getSmsDate() {
        List<CreateDistanceBean> list = new ArrayList<>();
        list.add(new CreateDistanceBean("手机", Constant.inputStyle, "", MString.phone));
        list.add(new CreateDistanceBean("验证码", Constant.buttonStyle, "", MString.ident_code));
        //list.add(new CreateDistanceBean("密码", Constant.inputStyle, "", MString.pwd));
        return list;
    }


    /**
     * 得到密码修改数据包*
     */
    public static List<CreateDistanceBean> getPswData() {
        List<CreateDistanceBean> list = new ArrayList<>();
        list.add(new CreateDistanceBean("手机号码", Constant.inputStyle, MyApp.userInfo.mobilePhone, MString.phone));
        list.add(new CreateDistanceBean("验证码", Constant.buttonStyle, "", MString.ident_code));
        return list;
    }

    /**
     * 得到密保数据包*
     */
    public static List<CreateDistanceBean> getSecretData() {
        List<CreateDistanceBean> list = new ArrayList<>();
        list.add(new CreateDistanceBean("密保问题1", Constant.SecretStyle, "", MString.security_problem1));
        list.add(new CreateDistanceBean("密保答案1", Constant.SecretStyle, "", MString.security_answer1));

        list.add(new CreateDistanceBean("密保问题2", Constant.SecretStyle, "", MString.security_problem2));
        list.add(new CreateDistanceBean("密保答案2", Constant.SecretStyle, "", MString.security_answer2));
        return list;
    }

    public static List<CreateDistanceBean> getSecretData(String json) {
        List<CreateDistanceBean> list = new ArrayList<>();
        JSONObject jsonObject = JSON.parseObject(json);
        list.add(new CreateDistanceBean("密保问题1", Constant.SecretStyle, jsonObject.getString(MString.security_problem1), MString.security_problem1));
        list.add(new CreateDistanceBean("密保答案1", Constant.SecretStyle, "", MString.security_answer1));

        list.add(new CreateDistanceBean("密保问题2", Constant.SecretStyle, jsonObject.getString(MString.security_problem2), MString.security_problem2));
        list.add(new CreateDistanceBean("密保答案2", Constant.SecretStyle, "", MString.security_answer2));
        return list;
    }

    public static List<CreateDistanceBean> getInfoData() {
        List<CreateDistanceBean> list = new ArrayList<>();
        list.add(new CreateDistanceBean("修改头像", Constant.InfoStyle, MyApp.userInfo.avatar, MString.avatar));
        list.add(new CreateDistanceBean("真实姓名", Constant.InfoStyle, MyApp.userInfo.getRealname(), MString.realname));
        list.add(new CreateDistanceBean("邮箱", Constant.InfoStyle, MyApp.userInfo.getEmail(), MString.email));
        list.add(new CreateDistanceBean("QQ", Constant.InfoStyle, MyApp.userInfo.getQq(), MString.qq));
        list.add(new CreateDistanceBean("微信号", Constant.InfoStyle, MyApp.userInfo.getWx(), MString.wx));
        list.add(new CreateDistanceBean("出生年月", Constant.InfoStyle, MyApp.userInfo.getBirthday(), MString.birthday));
        list.add(new CreateDistanceBean("性别", Constant.InfoStyle, MyApp.userInfo.getSex(), MString.sex));
        return list;
    }


    /**
     * 得到土质数据包*
     */
    public static List<CreateDistanceBean> getSoilDate() {
        List<CreateDistanceBean> list = new ArrayList<>();
        List<SystemTypeBean> data = FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.soilType);
        for (SystemTypeBean bean : data) {
            list.add(new CreateDistanceBean(bean.getTypename(), bean.getTypecode(), "0", "%"));
        }
        return list;
    }

    /**
     * 得到路况数据包*
     */
    public static List<CreateDistanceBean> getDistanceDate() {
        List<CreateDistanceBean> list = new ArrayList<>();
        List<SystemTypeBean> data = FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.transportType);
        for (SystemTypeBean bean : data) {
            list.add(new CreateDistanceBean(bean.getTypename(), bean.getTypecode(), "0", "km"));
        }
        return list;
    }

    /**
     * 得到踏勘数据包*
     */
    public static ReconnaissanceBean getReconnaissanceBean() {
        // list.add(new ReconnaissanceBean(type,isnewbulid,currentPt,altitude,accuracy,strength,strengthValue));
        return new ReconnaissanceBean(Constant.PHONE, Constant.ISCHECK, null, "", "0", "0");
    }

    /**
     * 得到点位类型数据包*
     */

    public static List<BitTypeTabItemBean> getBitTypeData(int type) {
        List<BitTypeTabItemBean> list = new ArrayList<>();
        if (type == 1) {
            list.add(new BitTypeTabItemBean("100001", "搭火点", R.mipmap.dwddahuodian, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100002", "柱上变压器", R.mipmap.dwdzhu, null, Constant.LOCALPOINT));
//            list.add(new BitTypeTabItemBean("100003", "箱式变电站", R.mipmap.dwdxiang, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100004", "杆塔", R.mipmap.dwdganta, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100005", "下户点", R.mipmap.dwdxiahudian, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100006", "户表箱", R.mipmap.dwdhubiaoxiang, null, Constant.LOCALPOINT));
//            list.add(new BitTypeTabItemBean("100007", "环网柜", R.mipmap.dwdhuanwanggui, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100008", "电缆分支箱", R.mipmap.dwddianlanfenzhix, null, Constant.LOCALPOINT));
//            list.add(new BitTypeTabItemBean("100009", "开关站", R.mipmap.dwdkaiguanzhan, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100011", "电缆(沿墙)", R.mipmap.dwdqiang, null, Constant.LOCALPOINT));
            list.add(new BitTypeTabItemBean("100012", "电缆(通道)", R.mipmap.dwddao, null, Constant.LOCALPOINT));
//            list.add(new BitTypeTabItemBean("100013", "电缆井", R.mipmap.dwdjing, null, Constant.LOCALPOINT));
//            list.add(new BitTypeTabItemBean("100010", "配电室", R.mipmap.dwdpeidianshi, null, Constant.LOCALPOINT));
        } else {
            list.add(new BitTypeTabItemBean("100014", "植被", R.mipmap.tzdzhibei, null, Constant.TEZHENGPOINT));
            list.add(new BitTypeTabItemBean("100015", "房屋", R.mipmap.tzdfangwu, null, Constant.TEZHENGPOINT));
            list.add(new BitTypeTabItemBean("100019", "道路", R.mipmap.dwddaolu, null, Constant.TEZHENGPOINT));
            list.add(new BitTypeTabItemBean("100016", "通讯线", R.mipmap.tzdtongxunx, null, Constant.TEZHENGPOINT));
            list.add(new BitTypeTabItemBean("100017", "低压线路", R.mipmap.tzddiya, null, Constant.TEZHENGPOINT));
            list.add(new BitTypeTabItemBean("100020", "高压线路", R.mipmap.tzdgaoya, null, Constant.TEZHENGPOINT));
            list.add(new BitTypeTabItemBean("100018", "沟、河流", R.mipmap.tzdheliu, null, Constant.TEZHENGPOINT));
        }
        return list;
    }


    public static Map<String, SystemTypeBean> getMapSysData(int i) {
        Map<String, SystemTypeBean> map = new HashMap<>();
        if (i == 1 | i == 0) {
            map.put("100001", new SystemTypeBean(R.mipmap.dwddahuodian1 + "", "搭火点"));
            map.put("100002", new SystemTypeBean(R.mipmap.dwdzhubian1 + "", "柱上变压器"));
            map.put("100003", new SystemTypeBean(R.mipmap.dwdxiangbian1 + "", "箱式变电站"));
            map.put("100004", new SystemTypeBean(R.mipmap.dwdganta1 + "", "杆塔"));
            map.put("100005", new SystemTypeBean(R.mipmap.dwdxiahudian1 + "", "下户点"));
            map.put("100006", new SystemTypeBean(R.mipmap.dwdhubiaoxiang1 + "", "户表箱"));
            map.put("100007", new SystemTypeBean(R.mipmap.dwdhuanwanggui1 + "", "环网柜"));
            map.put("100008", new SystemTypeBean(R.mipmap.dwddianlanfenzhixiang1 + "", "电缆分支箱"));
            map.put("100009", new SystemTypeBean(R.mipmap.dwdkaiguanzhan1 + "", "开关站"));
            map.put("100011", new SystemTypeBean(R.mipmap.dwdqiang1 + "", "电缆(沿墙)"));
            map.put("100012", new SystemTypeBean(R.mipmap.dwddao1 + "", "电缆(通道)"));
            map.put("100013", new SystemTypeBean(R.mipmap.dwdjing1 + "", "电缆井"));
            map.put("100010", new SystemTypeBean(R.mipmap.dwdpeidians1 + "", "配电室"));
        }
        if (i == 2 | i == 0) {
            map.put("100014", new SystemTypeBean(R.mipmap.tzdzhibie1 + "", "植被"));
            map.put("100015", new SystemTypeBean(R.mipmap.tzdfangwu1 + "", "房屋"));
            map.put("100019", new SystemTypeBean(R.mipmap.tzddaolu1 + "", "道路"));
            map.put("100016", new SystemTypeBean(R.mipmap.tzdtongxunxian1 + "", "通讯线"));
            map.put("100017", new SystemTypeBean(R.mipmap.tzddiya1 + "", "低压线路"));
            map.put("100020", new SystemTypeBean(R.mipmap.tzdgaoya1 + "", "高压线路"));
            map.put("100018", new SystemTypeBean(R.mipmap.tzdheliu1 + "", "沟、河流"));
        }
        return map;
    }


    public static Map<String, SystemTypeBean> getMapNumberData() {
        Map<String, SystemTypeBean> map = new HashMap<>();

        map.put("100001", new SystemTypeBean("11", "搭火点", "个", "T"));
        map.put("100002", new SystemTypeBean("11", "柱上变压器", "个", "ZB"));
        map.put("100003", new SystemTypeBean("11", "箱式变电站", "个", "XB"));
        map.put("100004", new SystemTypeBean("11", "杆塔", "基", "N"));
        map.put("100005", new SystemTypeBean("11", "下户点", "户", "X"));
        map.put("100006", new SystemTypeBean("11", "户表箱", "个", "J"));
        map.put("100007", new SystemTypeBean("11", "环网柜", "个", "HW"));
        map.put("100008", new SystemTypeBean("11", "电缆分支箱", "个", "DF"));
        map.put("100009", new SystemTypeBean("11", "开关站", "个", "KG"));
        map.put("100010", new SystemTypeBean("11", "配电室", "个", "PD"));
        map.put("100011", new SystemTypeBean("11", "电缆(沿墙)", "条", "DQ"));
        map.put("100012", new SystemTypeBean("11", "电缆(通道)", "条", "DT"));
        map.put("100013", new SystemTypeBean("11", "电缆井", "条", "DJ"));
        map.put("100014", new SystemTypeBean("12", "植被", "个", "G"));
        map.put("100015", new SystemTypeBean("12", "房屋", "个", "G"));
        map.put("100016", new SystemTypeBean("12", "通讯线", "条", "G"));
        map.put("100017", new SystemTypeBean("12", "低压线路", "条", "G"));
        map.put("100018", new SystemTypeBean("12", "沟、河流", "条", "G"));
        map.put("100019", new SystemTypeBean("12", "道路", "条", "G"));
        map.put("100020", new SystemTypeBean("12", "高压线路", "条", "G"));

        return map;
    }

    public static Map<String, Integer> getIconData(int i) {
        Map<String, Integer> map = new HashMap<>();
        if (i == 1 | i == 0) {
            map.put("100001", R.mipmap.dwddahuodian1);
            map.put("100002", R.mipmap.dwdzhubian1);
            map.put("100003", R.mipmap.dwdxiangbian1);
            map.put("100004", R.mipmap.dwdganta1);
            map.put("100005", R.mipmap.dwdxiahudian1);
            map.put("100006", R.mipmap.dwdhubiaoxiang1);
            map.put("100007", R.mipmap.dwdhuanwanggui1);
            map.put("100008", R.mipmap.dwddianlanfenzhixiang1);
            map.put("100009", R.mipmap.dwdkaiguanzhan1);
            map.put("100011", R.mipmap.dwdqiang1);
            map.put("100012", R.mipmap.dwddao1);
            map.put("100013", R.mipmap.dwdjing1);
            map.put("100010", R.mipmap.dwdpeidians1);
        }
        if (i == 2 | i == 0) {
            map.put("100014", R.mipmap.tzdzhibie1);
            map.put("100015", R.mipmap.tzdfangwu1);
            map.put("100019", R.mipmap.tzddaolu1);
            map.put("100016", R.mipmap.tzdtongxunxian1);
            map.put("100017", R.mipmap.tzddiya1);
            map.put("100020", R.mipmap.tzdgaoya1);
            map.put("100018", R.mipmap.tzdheliu1);
        }
        MyLog.L(MString.SUCCESSED + "map=" + JSON.toJSONString(map));
        return map;
    }

    /**
     * 照相数据包*
     */
    public static List<PhotoGraphBean> getPhotoGraphData(BackPhotosBean bean, boolean flag) {
        List<PhotoGraphBean> list = new ArrayList<>();
        if (bean == null || bean.onePhoto.photoNum == 0) {
//            list.add(new PhotoGraphBean(Constant.TypePosition, MString.Position, "到达点位,退后三步进行拍摄",
//                    " ", 1, "", getPhotos(0, Constant.TypePosition), null, null));
            list.add(new PhotoGraphBean(Constant.TypePosition, "竣工照片", "拍摄杆位现场竣工照片、塔头照片",
                    " ", 1, "", getPhotos(0, Constant.TypePosition), null, null));
        } else {
//            list.add(new PhotoGraphBean(Constant.TypePosition, MString.Position, "到达点位,退后三步进行拍摄",
//                    " ", 1, "", getPhotos_List(bean.onePhoto.photoList, Constant.TypePosition), null, null));
            list.add(new PhotoGraphBean(Constant.TypePosition, "竣工照片", "拍摄杆位现场竣工照片、塔头照片",
                    " ", 1, "", getPhotos_List(bean.onePhoto.photoList, Constant.TypePosition), null, null));
        }

        if (flag) {
            if (bean == null || bean.twoPhoto.photoNum == 0) {
                list.add(new PhotoGraphBean(Constant.TypePassageway, MString.Passageway, "转身拍摄通道信息",
                        " ", -1, "", getPhotos(0, Constant.TypePassageway), null, null));
            } else {
                list.add(new PhotoGraphBean(Constant.TypePassageway, MString.Passageway, "转身拍摄通道信息",
                        " ", -1, "", getPhotos_List(bean.twoPhoto.photoList, Constant.TypePassageway), null, null));
            }
//            if (bean == null || bean.threePhoto.photoNum == 0) {
//                list.add(new PhotoGraphBean(Constant.TypeEnvironmental, MString.Environmental, "记录环境影响因素",
//                        " ", 3, "", getPhotos(0, Constant.TypeEnvironmental), null, null));
//            } else {
//                list.add(new PhotoGraphBean(Constant.TypeEnvironmental, MString.Environmental, "记录环境影响因素",
//                        " ", 3, "", getPhotos_List(bean.threePhoto.photoList, Constant.TypeEnvironmental), null, null));
//            }
        }


        return list;
    }

    /**
     * 单张照片数据包转化*
     */
    public static List<PhotoBean> getPhotos_List(List<BackPhoto_Bean> data, int type) {
        List<PhotoBean> list = new ArrayList<>();
        for (BackPhoto_Bean b : data) {
            if (!b.getFlag().equals(MString.del)) {
                list.add(new PhotoBean(type, null, b));
            }
        }
        return list;
    }

    /**
     * 单张照片数据包*
     */
    public static List<PhotoBean> getPhotos(int j, int type) {
        List<PhotoBean> list = new ArrayList<>();
        if (j > 0) {
            for (int i = 0; i < j; i++) {
                list.add(new PhotoBean(type, null, ""));
            }
        } else {
            list.add(new PhotoBean(type, null, ""));
        }
        return list;
    }

    /**
     * 获取选择器适配数据*
     */
    public static ArrayList<SystemTypeBean> getSystemTypeBean(String id) {
        return (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(id);
    }

    /**
     * 获取选择器适配数据值*
     */
    public static String getStringFormSystemTypeBean(String id, String code) {
        ArrayList<SystemTypeBean> data = (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(id);
        if (data != null && data.size() > 0) {
            for (SystemTypeBean b : data) {
                if (b.getTypecode().equals(code)) {
                    return b.getTypename();
                }
            }
        }
        return "";

    }

    /**
     * 环境照片设置数据包*
     */
    public static List<PhotoEnvironmentalItemBean> getEnvironmentalBean() {
        List<PhotoEnvironmentalItemBean> items = new ArrayList<>();
//        String title, String type, String value, String choiceData, String path
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_TEXT, true, "交通情况", MString.traffic, Constant.ChoiceItem, "", "未选择", (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.transportType), ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_NUMBER, true, "实际宽度", MString.width, Constant.EdItem, "0", "未填写", null, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_NUMBER, true, "人工运距", MString.haul_distance, Constant.EdItem, "0", "未填写", null, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_TEXT, false, "文字备注", MString.characters_remark, Constant.remarksItem, "", "请填写备注信息", null, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_TEXT, false, "语音备注", MString.voice_remark, Constant.SpeechItem, "", "", null, ""));
        return items;
    }

    /**
     * 环境照片设置数据包*
     */
    public static List<PhotoEnvironmentalItemBean> getEnvironmentalBean(String... values) {
        List<PhotoEnvironmentalItemBean> items = new ArrayList<>();
//        String title, String type, String value, String choiceData, String path
        ArrayList<SystemTypeBean> data = (ArrayList<SystemTypeBean>) FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.transportType);
        String s = "";
        for (SystemTypeBean b : data) {
            if (b.getTypecode().equals(values[0])) {
                s = b.getTypename();
                break;
            }
        }
        for (int v = 0; v < values.length; v++) {
            if (values[v] == null) {
                values[v] = "";
            }
        }
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_TEXT, true, "交通情况", MString.traffic, Constant.ChoiceItem, s, "未选择", data, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_NUMBER, true, "实际宽度", MString.width, Constant.EdItem, values[1], "未填写", null, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_NUMBER, true, "人工运距", MString.haul_distance, Constant.EdItem, values[2], "未填写", null, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_TEXT, false, "文字备注", MString.characters_remark, Constant.remarksItem, values[3], "请填写备注信息", null, ""));
        items.add(new PhotoEnvironmentalItemBean(InputType.TYPE_CLASS_TEXT, false, "语音备注", MString.voice_remark, Constant.SpeechItem, "", "", null, values[4]));
        return items;
    }

    public static List<String> getData() {
        List<String> data = new ArrayList<>();
        data.add("1");
        data.add("2");
        return data;
    }

    public static ArrayList<String> getData(String... s) {
        List<String> data = new ArrayList<>();
        for (int i = 0; i < s.length; i++) {
            data.add(s[i]);
        }
        return (ArrayList<String>) data;
    }

    /**
     * 通道数据包*
     */
    public static PhotoPassagewayBean getPhotoPassagewayBean() {
//        return new PhotoPassagewayBean(getPhotoItem(),null);
        return new PhotoPassagewayBean(getPhotoItem(), null);
    }

    private static List<PhotoPassagewayItemBean> getPhotoItem() {
        List<PhotoPassagewayItemBean> beans = new ArrayList<>();
        beans.add(new PhotoPassagewayItemBean("100019", R.mipmap.tzd1daolu + "", R.mipmap.tzd2daolu + "", "道路", "C015", PhotoPassIconTermBean.getDaoLu()));
        beans.add(new PhotoPassagewayItemBean("100017", R.mipmap.tzd1diya + "", R.mipmap.tzd2diya + "", "低压线路", "C015", PhotoPassIconTermBean.getDiYa()));
        beans.add(new PhotoPassagewayItemBean("100015", R.mipmap.tzd1fangwu + "", R.mipmap.tzd2fangwu + "", "房屋", "C015", PhotoPassIconTermBean.getFangWu()));
        beans.add(new PhotoPassagewayItemBean("100020", R.mipmap.tzd1gaoya + "", R.mipmap.tzd2gaoya + "", "高压线路", "D11-6", PhotoPassIconTermBean.getGaoYa()));
        beans.add(new PhotoPassagewayItemBean("100018", R.mipmap.tzd1heliu + "", R.mipmap.tzd2heliu + "", "河流", "C015", PhotoPassIconTermBean.getHeLiu()));
        beans.add(new PhotoPassagewayItemBean("100016", R.mipmap.tzd1tongxunxian + "", R.mipmap.tzd2tongxunxian + "", "通讯线", "C015", PhotoPassIconTermBean.getTongXunXian()));
        beans.add(new PhotoPassagewayItemBean("100014", R.mipmap.tzd1zhibei + "", R.mipmap.tzd2zhibei + "", "植被", "D12R3", PhotoPassIconTermBean.getZhiBei()));
        //beans.add(new PhotoPassagewayItemBean(R.mipmap.kyqita+"",R.mipmap.kyhqita+"", "其他", "D11-6"));
        return beans;
    }

    public static void addPassItem(Exploration c, List<PhotoPassagewayItemBean> list) {
        switch (c.pt_id) {
            case "100019":
                list.add(new PhotoPassagewayItemBean("100019", c, R.mipmap.tzd1daolu + "", R.mipmap.tzd2daolu + "", "道路", "C015", PhotoPassIconTermBean.getDaoLu()));
                break;
            case "100017":
                list.add(new PhotoPassagewayItemBean("100017", c, R.mipmap.tzd1diya + "", R.mipmap.tzd2diya + "", "低压线路", "C015", PhotoPassIconTermBean.getDiYa()));
                break;
            case "100015":
                list.add(new PhotoPassagewayItemBean("100015", c, R.mipmap.tzd1fangwu + "", R.mipmap.tzd2fangwu + "", "房屋", "C015", PhotoPassIconTermBean.getFangWu()));
                break;
            case "100020":
                list.add(new PhotoPassagewayItemBean("100020", c, R.mipmap.tzd1gaoya + "", R.mipmap.tzd2gaoya + "", "高压线路", "D11-6", PhotoPassIconTermBean.getGaoYa()));
                break;
            case "100018":
                list.add(new PhotoPassagewayItemBean("100018", c, R.mipmap.tzd1heliu + "", R.mipmap.tzd2heliu + "", "河流", "C015", PhotoPassIconTermBean.getHeLiu()));
                break;
            case "100016":
                list.add(new PhotoPassagewayItemBean("100016", c, R.mipmap.tzd1tongxunxian + "", R.mipmap.tzd2tongxunxian + "", "通讯线", "C015", PhotoPassIconTermBean.getTongXunXian()));
                break;
            case "100014":
                list.add(new PhotoPassagewayItemBean("100014", c, R.mipmap.tzd1zhibei + "", R.mipmap.tzd2zhibei + "", "植被", "D12R3", PhotoPassIconTermBean.getZhiBei()));
                break;
        }
    }

    public static void addPassItem(ChannelListBean c, List<PhotoPassagewayItemBean> list) {
        switch (c.pt_id) {
            case "100019":
                list.add(new PhotoPassagewayItemBean("100019", c, R.mipmap.tzd1daolu + "", R.mipmap.tzd2daolu + "", "道路", "C015", PhotoPassIconTermBean.getDaoLu()));
                break;
            case "100017":
                list.add(new PhotoPassagewayItemBean("100017", c, R.mipmap.tzd1diya + "", R.mipmap.tzd2diya + "", "低压线路", "C015", PhotoPassIconTermBean.getDiYa()));
                break;
            case "100015":
                list.add(new PhotoPassagewayItemBean("100015", c, R.mipmap.tzd1fangwu + "", R.mipmap.tzd2fangwu + "", "房屋", "C015", PhotoPassIconTermBean.getFangWu()));
                break;
            case "100020":
                list.add(new PhotoPassagewayItemBean("100020", c, R.mipmap.tzd1gaoya + "", R.mipmap.tzd2gaoya + "", "高压线路", "D11-6", PhotoPassIconTermBean.getGaoYa()));
                break;
            case "100018":
                list.add(new PhotoPassagewayItemBean("100018", c, R.mipmap.tzd1heliu + "", R.mipmap.tzd2heliu + "", "河流", "C015", PhotoPassIconTermBean.getHeLiu()));
                break;
            case "100016":
                list.add(new PhotoPassagewayItemBean("100016", c, R.mipmap.tzd1tongxunxian + "", R.mipmap.tzd2tongxunxian + "", "通讯线", "C015", PhotoPassIconTermBean.getTongXunXian()));
                break;
            case "100014":
                list.add(new PhotoPassagewayItemBean("100014", c, R.mipmap.tzd1zhibei + "", R.mipmap.tzd2zhibei + "", "植被", "D12R3", PhotoPassIconTermBean.getZhiBei()));
                break;
        }
    }

    public static void addPassItem(ChannelAListBean c, List<PhotoPassagewayItemBean> list) {
        switch (c.pt_id) {
            case "100019":
                list.add(new PhotoPassagewayItemBean("100019", c, R.mipmap.tzd1daolu + "", R.mipmap.tzd2daolu + "", "道路", "C015", PhotoPassIconTermBean.getDaoLu()));
                break;
            case "100017":
                list.add(new PhotoPassagewayItemBean("100017", c, R.mipmap.tzd1diya + "", R.mipmap.tzd2diya + "", "低压线路", "C015", PhotoPassIconTermBean.getDiYa()));
                break;
            case "100015":
                list.add(new PhotoPassagewayItemBean("100015", c, R.mipmap.tzd1fangwu + "", R.mipmap.tzd2fangwu + "", "房屋", "C015", PhotoPassIconTermBean.getFangWu()));
                break;
            case "100020":
                list.add(new PhotoPassagewayItemBean("100020", c, R.mipmap.tzd1gaoya + "", R.mipmap.tzd2gaoya + "", "高压线路", "D11-6", PhotoPassIconTermBean.getGaoYa()));
                break;
            case "100018":
                list.add(new PhotoPassagewayItemBean("100018", c, R.mipmap.tzd1heliu + "", R.mipmap.tzd2heliu + "", "河流", "C015", PhotoPassIconTermBean.getHeLiu()));
                break;
            case "100016":
                list.add(new PhotoPassagewayItemBean("100016", c, R.mipmap.tzd1tongxunxian + "", R.mipmap.tzd2tongxunxian + "", "通讯线", "C015", PhotoPassIconTermBean.getTongXunXian()));
                break;
            case "100014":
                list.add(new PhotoPassagewayItemBean("100014", c, R.mipmap.tzd1zhibei + "", R.mipmap.tzd2zhibei + "", "植被", "D12R3", PhotoPassIconTermBean.getZhiBei()));
                break;
        }
    }

    /**
     * 是否共杆*
     */
    public static ArrayList<SystemTypeBean> getArrayList(String... s) {
        ArrayList<SystemTypeBean> data = new ArrayList<>();
        data.add(new SystemTypeBean("0", s[1]));
        data.add(new SystemTypeBean("1", s[0]));
        return data;
    }

    public static ArrayList<SystemTypeBean> getList(String... s) {
        ArrayList<SystemTypeBean> data = new ArrayList<>();
        for (int i = 0; i < s.length; i++) {
            data.add(new SystemTypeBean(s[i], s[i]));
        }
        return data;
    }

    /**
     * 获取搜索初始数据*
     */
    public static List<SearchBean> getSearchBeanList(ProjectFragment fragment) {
        List<SearchBean> list = new ArrayList<>();
//        list.add(new SearchBean(MString.year, "年份", Constant.Search_Time, null, "", fragment.start_year + "—" + fragment.end_year, fragment.start_year + "—" + fragment.end_year, IconSourse.Calendar + ""));
//        list.add(new SearchBean(MString.current_stage, Constant.设计阶段, Constant.Search_ChoiceButton, FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.designStage), "", "", fragment.current_stage, ""));
//        list.add(new SearchBean(MString.project_type, Constant.项目类型, Constant.Search_ChoiceButton, FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectType), "", "", fragment.project_type, ""));
//        list.add(new SearchBean(MString.current_schedule, Constant.项目进度, Constant.Search_ChoiceButton, FastJsonUtil.JsonToData_Code(HttpStringCodeTableUtil.projectSchedule), "", "", fragment.current_schedule, ""));
//        list.add(new SearchBean(MString.owner_unit, "其他选择", Constant.Search_Choice, null, Constant.业主单位, "", fragment.owner_unit_string, IconSourse.SelectEntries + ""));
//        list.add(new SearchBean(MString.design_unit, "其他选择", false, Constant.Search_Choice, null, Constant.设计单位, "", fragment.design_unit_string, IconSourse.SelectEntries + ""));
        list.add(new SearchBean("", "", Constant.Search_finish, null, "", "", "", ""));
        return list;
    }

    /**
     * 获取项目搜索初数据*
     */
    public static List<SearchBean> getProjectSearchBeanList() {
        List<SearchBean> list = new ArrayList<>();
        list.add(new SearchBean(MString.year, "", Constant.Search_Time, null, "创建年份", StatisticalAnalysisActivity.startYear + "—" + StatisticalAnalysisActivity.endYear, StatisticalAnalysisActivity.startYear + "—" + StatisticalAnalysisActivity.endYear, IconSourse.Calendar + ""));
        list.add(new SearchBean(MString.owner_unit, "其他选择", Constant.Search_Choice, null, Constant.业主单位, "", "", IconSourse.SelectEntries + ""));
        list.add(new SearchBean(MString.design_unit, "其他选择", false, Constant.Search_Choice, null, Constant.设计单位, "", "", IconSourse.SelectEntries + ""));
        list.add(new SearchBean("", "", Constant.Search_finish, null, "", "", "", ""));
        return list;
    }


    /**
     * 我的*
     */
    public static List<MyListViewItemBean> getMyListData() {
        List<MyListViewItemBean> list = new ArrayList<>();
//        list.add(new MyListViewItemBean(IconSourse.statistics, "项目统计", false, ListenerSet.founction_statistical_analysis));
//        list.add(new MyListViewItemBean(IconSourse.ZHANWEI, "数据同步", false, ListenerSet.founction_synchronization));
//        list.add(new MyListViewItemBean(IconSourse.experience, "我的经验", false, ListenerSet.founction_experience));
        list.add(new MyListViewItemBean(IconSourse.offlinemap, "离线地图", false, ListenerSet.founction_offlinemap));
        list.add(new MyListViewItemBean(IconSourse.tograntauthorization, "购买授权", false, ListenerSet.founction_authorization));
        list.add(new MyListViewItemBean(IconSourse.setting, "应用设置", false, ListenerSet.founction_appsettings));
        list.add(new MyListViewItemBean(IconSourse.aboutus, "关于我们", false, ListenerSet.founction_aboutmy));
        return list;
    }

    /**
     * 我的_个人中心*
     */
    public static ArrayList<SystemTypeBean> getUserItem() {
        ArrayList<SystemTypeBean> data = new ArrayList<>();
        data.add(new SystemTypeBean(MyApp.userInfo.getUsername(), "用户名", Constant.onlyRead + ""));
        data.add(new SystemTypeBean(MyApp.userInfo.getMobilePhone(), "手机号", Constant.onlyRead + ""));
        data.add(new SystemTypeBean("", MString.Password, Constant.onlyActivity + ""));
        data.add(new SystemTypeBean("", MString.SecretSet, Constant.onlyActivity + ""));
        data.add(new SystemTypeBean("", MString.PInformationSet, Constant.onlyActivity + ""));
        data.add(new SystemTypeBean("", MString.OutLogin, Constant.onlyOut + ""));
        return data;
    }


    /**
     * 获取典设库条目数据*
     */
    public static List<CodelibraryConditionBean> getCodelibraryConditionData() {
        List<CodelibraryConditionBean> beans = new ArrayList<>();
        beans.add(new CodelibraryConditionBean("版本", MString.codeset_version_id, "", "", Constant.onlyActivity));
        beans.add(new CodelibraryConditionBean("类型", MString.pt_id, "", "", Constant.onlyActivity));
        beans.add(new CodelibraryConditionBean("名称", MString.name, "", "", Constant.onlyWrite));
//        beans.add(new CodelibraryConditionBean("典设版本", MString.codeset_version_id, "", "", Constant.onlyActivity));
//        beans.add(new CodelibraryConditionBean("典设类型", MString.pt_id, "", "", Constant.onlyActivity));
//        beans.add(new CodelibraryConditionBean("典设名称", MString.name, "", "", Constant.onlyWrite));
        //  beans.add(new CodelibraryConditionBean("关键字", MString.keyword, "", "", Constant.onlyWrite));
        //beans.add(new CodelibraryConditionBean("搜索","","","",Constant.onlyOut));
        return beans;
    }

    /**
     * 获取典设库条目数据*
     */
    public static List<CodelibraryConditionBean> getCodelibraryConditionData_choice() {
        List<CodelibraryConditionBean> beans = new ArrayList<>();
        beans.add(new CodelibraryConditionBean("典设名称", MString.name, "", "", Constant.onlyWrite));
        //  beans.add(new CodelibraryConditionBean("关键字", MString.keyword, "", "", Constant.onlyWrite));
        beans.add(new CodelibraryConditionBean("搜索", "", "", "", Constant.onlyOut));
        return beans;
    }

    /**
     * 项目统计字段数据源*
     */
    public static List<ProjectSumItemBean> getProjectSumData(ProjectSumBean bean) {
        List<ProjectSumItemBean> beans = new ArrayList<>();
        beans.add(new ProjectSumItemBean("总计", "", bean.getTotal(), 0));
        //List<SystemTypeBean> data=getSystemTypeBean(HttpStringCodeTableUtil.designStage);
        beans.add(new ProjectSumItemBean("可研", "11", bean.getReview(), R.drawable.c18_feasibilitystudy_blue_item));
        beans.add(new ProjectSumItemBean("初设", "12", bean.getPreDesign(), R.drawable.c18_preliminarydesign_yellow_item));
        beans.add(new ProjectSumItemBean("施设", "13", bean.getConsDesign(), R.drawable.c18_charity_red_item));
        beans.add(new ProjectSumItemBean("竣工", "14", bean.getCompleted(), R.drawable.c18_becompleted_green_item));

//        beans.add(new ProjectSumItemBean("可研", ""+100, R.drawable.c18_feasibilitystudy_blue_item));
//        beans.add(new ProjectSumItemBean("初设", ""+50,R.drawable.c18_preliminarydesign_yellow_item));
//        beans.add(new ProjectSumItemBean("施设", ""+80,R.drawable.c18_charity_red_item));
//        beans.add(new ProjectSumItemBean("竣工", ""+10, R.drawable.c18_becompleted_green_item));
        return beans;
    }


    /**
     * 应用设置数据源*
     */
    public static List<SettingItemBean> getSettingsData() {
        List<SettingItemBean> beans = new ArrayList<>();
        try {
            beans.add(new SettingItemBean("清除缓存", DataCleanManager.getCacheSize(MyApp.activity.getCacheDir()) + "", Constant.setting_value, ListenerSet.founction_clearcache));
        } catch (Exception e) {
            beans.add(new SettingItemBean("清除缓存", "0B", Constant.setting_value, ListenerSet.founction_clearcache));
        }
        beans.add(new SettingItemBean("接受推送", Constant.setting_push, ShardPreferencesTool.getshare(MyApp.activity, MString.PUSH, true), ListenerSet.founction_push));
        beans.add(new SettingItemBean("是否离线", Constant.setting_push, !ShardPreferencesTool.getshare(MyApp.activity, MString.IsOnLine, true), ListenerSet.founction_isoffline));
        beans.add(new SettingItemBean("移动文件到SD卡", "点击复制", Constant.setting_value, ListenerSet.founction_cachetosd));
//        beans.add(new SettingItemBean("删除项目文件缓存", "点击删除", Constant.setting_value, ListenerSet.founction_delectcache));
        beans.add(new SettingItemBean("删除项目缓存文件", "", Constant.setting_value, ListenerSet.founction_delectprojectcache));
        beans.add(new SettingItemBean("检查更新", "", Constant.setting_value, ListenerSet.founction_check));
        return beans;
    }

    /**
     * 支付选择数据源*
     */
    public static List<SettingItemBean> getPayData() {
        List<SettingItemBean> beans = new ArrayList<>();
        beans.add(new SettingItemBean("支付宝", IconSourse.ali + "", MString.ali, R.color.aliblue, null));
        beans.add(new SettingItemBean("微信钱包", IconSourse.wx + "", MString.wx, R.color.wxgreen, null));
        return beans;
    }

    //验收记录：搜索类别
    public static ArrayList<String> getSSLBPopItem() {
        ArrayList<String> list = new ArrayList<>();
//        list.add("全部");
        list.add("杆塔组装");
        list.add("金具安装");
        list.add("拉线安装");
        list.add("导线架设");
        list.add("标识安装");
        list.add("电器设备安装");
        list.add("接地装置安装");
        list.add("基坑、基础工程");
        list.add("其他");
        return list;
    }

    //验收记录：搜索类别
    public static ArrayList<String> getResPopItem() {
        ArrayList<String> list = new ArrayList<>();
        list.add("未处理");
        list.add("已处理");
        return list;
    }
}
